﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Models
{
    /// <summary>
    /// 价格模板项
    /// </summary>
    public class PriceTemplateItem:BaseModel
    {
        public Guid TemplateId { get; set; }

        public Guid ProductId { get; set; }

        /// <summary>
        /// 1：按牙位（默认）  2：按数量
        /// </summary>
        public int Type { get; set; } = 1;

        public decimal Price { get; set; }
        
        [ForeignKey(nameof(TemplateId))]
        public virtual PriceTemplate Template { get; set; }

        [ForeignKey(nameof(ProductId))]
        public BeGoodAt Product { get; set; }
    }
}
